-- GENERATED SPELL FOR [Fingrom] --


function spell0_20757(pUnit, Event) --@Blast Wave,Self--
pUnit:FullCastSpellOnTarget(17145,pUnit)
pUnit:RegisterEvent('Sorts_20757', 6337, 1)
end

function spell1_20757(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(15242,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20757', 3000, 1)
end

function spell2_20757(pUnit, Event) --@Ice Barrier,Self--
pUnit:FullCastSpellOnTarget(33245,pUnit)
pUnit:RegisterEvent('Sorts_20757', 30274, 1)
end

function Sorts_20757(pUnit, Event)
local choix_sorts_20757 = math.random(0, 2)
if choix_sorts_20757 == 0 then
pUnit:RegisterEvent('spell0_20757', 1, 1)
end
if choix_sorts_20757 == 1 then
pUnit:RegisterEvent('spell1_20757', 1, 1)
end
if choix_sorts_20757 == 2 then
pUnit:RegisterEvent('spell2_20757', 1, 1)
end
end

function mob20757_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20757', math.random(1500, 3000), 1)
end

function mob20757_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20757_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20757_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20757, 1, 'mob20757_Action')
RegisterUnitEvent(20757, 2, 'mob20757_Leave')
RegisterUnitEvent(20757, 3, 'mob20757_Kill')
RegisterUnitEvent(20757, 4, 'mob20757_Die')
